package com.tensai.study.java.newconcept.typereactiveprogram.reactor.flux;

import org.junit.Test;
import reactor.core.publisher.Flux;

public class SwitchIfEmptyTest {

	@Test
	public void test() {
		Flux.just("test")
				.switchIfEmpty(Flux.error(new RuntimeException()))
				.flatMap(it -> {
					System.out.println(it);
					return Flux.empty();
				}).subscribe();
	}
}
